﻿<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="SetPrintContent.aspx.vb"
    Inherits="MyWorkflow.SetPrintContent" %>

<%@ Register TagPrefix="mnu" Namespace="Mysoft.Map.Application.Menus" Assembly="Mysoft.Map.Application.Components" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <link rel="stylesheet" type="text/css" href="/_common/styles/global.css">
    <link rel="stylesheet" type="text/css" href="/_nav/menu.css">

    <script language="javascript" src="/_common/scripts/global.js"></script>

    <script language="javascript" src="/_nav/menu.js"></script>

    <script language="javascript" src="/PubProject/js/Public.js"></script>

    <script type="text/javascript">
        // 界面初始化
        var _MyHelpfile = "/MyWorkflow/help/工作流配置/参数配置/参数配置.htm";
		function window.onload()
		{
			if (document.getElementById("txtMode").value!="3")
			{
				scSave.style.display = "";
			}
			BindData()
		}
		
		function BindData(){
		    var sFile = "/myworkflow/Pub_XMLHTTP.aspx?ParamName=" + escape("wf_PrintContent_G");
		    var sRtn = openXMLHTTP(sFile,"GetPI");
		    if(sRtn.length > 0){
		        var arrP = sRtn.split(",");
	            for(var i = 0;i<document.all.cbPrintContent.length;i++){
	                for(var j = 0;j<arrP.length;j++){
	                    if(document.all.cbPrintContent[i].value == arrP[j]){
	                        document.all.cbPrintContent[i].checked = true;
	                        break;
	                    }else{
	                        document.all.cbPrintContent[i].checked = false;
	                    }
	                }
	            }
		    }
		}
		
		function ParamSave(){
		    var paramValue = "";
		    for(var i = 0;i<document.all.cbPrintContent.length;i++){
		        if(document.all.cbPrintContent[i].checked){
		            if(paramValue.length > 0)
		                paramValue += ",";
		            paramValue += document.all.cbPrintContent[i].value;
		        }
		    }
	    	var sFile = "/myworkflow/Pub_XMLHTTP.aspx?ParamValue=" + escape(paramValue) + "&ParamName=" + escape("wf_PrintContent_G");
			
			var sRtn = openXMLHTTP(sFile,"SavePI");
			if (sRtn == "OK"){
				alert("保存成功！");
			}else{
			    alert("保存失败！");
			}
		}
    </script>

</head>
<body style="margin: 5px">
    <form id="form1" runat="server">
    <asp:TextBox ID="txtMode" runat="server" Style="display: none">2</asp:TextBox>
    </form>
    <table width="100%" style="table-layout: fixed" cellspacing="0" cellpadding="0">
        <tr>
            <td>
                <mnu:AppGridMenu ID="AppGridMenu1" runat="server"></mnu:AppGridMenu>
            </td>
        </tr>
        <tr height="40">
            <td>
                <table cellspacing="10" cellpadding="0" height="100%" width="100%">
                    <tr>
                        <td class="sec bar">
                           选择默认打印项
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td align="center">
                <table width="80%" cellspacing="2" cellpadding="2">
                    <tr>
                        <td>
                            <input type="checkbox" name="cbPrintContent" value="1" />流程属性
                        </td>
                        <td>
                            <input type="checkbox" name="cbPrintContent" value="2" />业务表单
                        </td>
                        <td>
                            <input type="checkbox" name="cbPrintContent" value="3" />审批附件
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <input type="checkbox" name="cbPrintContent" value="4" />审批意见
                        </td>
                        <td>
                            <input type="checkbox" name="cbPrintContent" value="5" />审批流程
                        </td>
                        <td>
                            <input type="checkbox" name="cbPrintContent" value="6" />历史业务信息
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
</body>
</html>
